package com.atguigu.upp.service;

import com.atguigu.upp.bean.TagInfo;
import com.atguigu.upp.bean.TaskInfo;
import com.atguigu.upp.bean.TaskTagRule;
import com.atguigu.upp.mapper.ClickhouseMapper;
import com.atguigu.upp.mapper.TagInfoMapper;
import com.atguigu.upp.mapper.TaskInfoMapper;
import com.atguigu.upp.mapper.TaskTagRuleMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * Created by Smexy on 2022/10/13
 */
public class CKDBService
{

    private ClickhouseMapper clickhouseMapper;


    //在构造器中赋值
    public CKDBService(SqlSession sqlSession){
       clickhouseMapper = sqlSession.getMapper(ClickhouseMapper.class);
    }

    public void createWideTable(String table, String column){
        clickhouseMapper.createWideTable(table,column);
    }

    public void dropWideTable(String table){
        clickhouseMapper.dropWideTable(table);
    }

    public void insertBitmap(String table,String tags,String sourceTable,String doDate){
        clickhouseMapper.insertBitmap(table,tags,sourceTable,doDate);
    }

    public void deleteOldPartitionData(String table,String doDate){
        clickhouseMapper.deleteOldPartitionData(table,doDate);
    }

}
